import request from '@/utils/request'

// 获取工程基本信息
export function getInfo(masterId) {
  return request({
    url: '/engineering/meterage/detail/' + masterId,
    method: 'get'
  })
}

// 获取用户节点列表
export function selectUserOptions(masterId) {
  return request({
    url: '/engineering/meterage/detail/selectUserOptions/' + masterId,
    method: 'get'
  })
}

// 查询计量清单
export function selectMeterageBoqList(query) {
  return request({
    url: '/engineering/meterage/detail/selectMeterageBoqList',
    method: 'get',
    params: query
  })
}

// 查询工程计量合同清单列表
export function listDetailContract(query) {
  return request({
    url: '/engineering/meterage/detail/listDetailContract',
    method: 'get',
    params: query
  })
}

// 查询工程计量填报说明详情
export function getDetailExplain(query) {
  return request({
    url: '/engineering/meterage/detail/getDetailExplain',
    method: 'get',
    params: query
  })
}

// 新增合同计量清单
export function saveContract(data) {
  return request({
    url: '/engineering/meterage/detail/saveContract',
    method: 'post',
    params: data
  })
}

// 查询工程计量合同清单详细
export function getDetailContract(detailContractId) {
  return request({
    url: '/engineering/meterage/detail/getDetailContract/' + detailContractId,
    method: 'get'
  })
}

// 修改工程计量-合同清单详情
export function updateDetailContract(data) {
  return request({
    url: '/engineering/meterage/detail/updateDetailContract',
    method: 'post',
    data: data
  })
}

// 删除工程计量-合同清单详情
export function delDetailContract(detailContractId) {
  return request({
    url: '/engineering/meterage/detail/deleteDetailContract/' + detailContractId,
    method: 'delete'
  })
}

// 查询工程计量变更清单列表
export function listDetailChange(query) {
  return request({
    url: '/engineering/meterage/detail/listDetailChange',
    method: 'get',
    params: query
  })
}

// 新增变更计量清单
export function saveChange(data) {
  return request({
    url: '/engineering/meterage/detail/saveChange',
    method: 'post',
    params: data
  })
}

// 查询工程计量变更清单详细
export function getDetailChange(detailChangeId) {
  return request({
    url: '/engineering/meterage/detail/getDetailChange/' + detailChangeId,
    method: 'get'
  })
}

// 修改工程计量-变更清单详情
export function updateDetailChange(data) {
  return request({
    url: '/engineering/meterage/detail/updateDetailChange',
    method: 'post',
    data: data
  })
}

// 删除工程计量-变更清单详情
export function delDetailChange(detailChangeId) {
  return request({
    url: '/engineering/meterage/detail/deleteDetailChange/' + detailChangeId,
    method: 'delete'
  })
}

// 查询工程计量其他支付项目列表
export function listDetailOther(query) {
  return request({
    url: '/engineering/meterage/detail/listDetailOther',
    method: 'get',
    params: query
  })
}

// 查询工程计量其他支付项目详细
export function getDetailOther(detailOtherId) {
  return request({
    url: '/engineering/meterage/detail/getDetailOther/' + detailOtherId,
    method: 'get'
  })
}

// 修改工程计量-其他支付项目详情
export function updateDetailOther(data) {
  return request({
    url: '/engineering/meterage/detail/updateDetailOther',
    method: 'post',
    data: data
  })
}

// 修改工程计量-填报说明
export function updateDetailExplain(data) {
  return request({
    url: '/engineering/meterage/detail/updateDetailExplain',
    method: 'post',
    data: data
  })
}

// 同步其他支付项目里的固定值
export function syncDetailItem(masterId) {
  return request({
    url: '/engineering/meterage/detail/syncDetailItem/' + masterId,
    method: 'get'
  })
}

// 合同计量复制
export function copy(data) {
  return request({
    url: '/engineering/meterage/detail/copy',
    method: 'post',
    data: data
  })
}
